#include <bits/stdc++.h>
using namespace std;
using ll = int64_t;
const ll maxn{ll(20+5)};
ll mx,my,bx,by;
ll dp[maxn][maxn];
int main(){
    iostream::sync_with_stdio(0),cin.tie(0),cout.tie(0);
    cin>>bx>>by>>mx>>my;
    mx+=1;
    my+=1;
    dp[0][1]=1;
    for(ll i{1};i<=bx+1;i++){
        for(ll j{1};j<=by+1;j++){
            if(
                (i==mx-1&&(j==my-2||j==my+2))||
                (i==mx-2&&(j==my-1||j==my+1))||
                (i==mx+1&&(j==my-2||j==my+2))||
                (i==mx+2&&(j==my+1||j==my-1))
                ||(i==mx&&j==my)
            ){
                continue;
            }
            dp[i][j]=dp[i-1][j]+dp[i][j-1];
        }
    }
    cout<<dp[bx+1][by+1]<<'\n';
}